home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 23
/
Aminet 23 (1998)(GTI - Schatztruhe)[!][Feb 1998].iso
/
Aminet
/
dev
/
misc
/
gms_dev.lha
/
GMSDev
/
Source
/
E
/
Screens
/
FadingDemo.e
< prev
next >
Wrap
Text File
|
1997-12-05
|
2KB
|
62 lines
/* Name: Fade Demo
** Author: Paul Manias
** Copyright: DreamWorld Productions (c) 1996-1997. Freely distributable.
*/
MODULE 'dpkernel','dpkernel/dpkernel','graphics/pictures','files/files'
MODULE 'screens','system/register','system/modules','input/joydata'
MODULE 'graphics/screens','graphics/blitter'
PROC main()
DEF fstate = NIL :LONG,
screen = NIL :PTR TO screen,
pic = NIL :PTR TO picture,
scrmodule = NIL :PTR TO module,
picfile :filename
picfile := [ ID_FILENAME, 'GMS:demos/data/PIC.Green']:filename
IF dpkbase := OpenLibrary('GMS:libs/dpkernel.library',0)
IF (scrmodule := Init([TAGS_MODULE,NIL,
MODA_NUMBER, MOD_SCREENS,
MODA_TABLETYPE, JMP_AMIGAE,
TAGEND], NIL))
scrbase := scrmodule.modbase
IF (pic := Load(picfile, ID_PICTURE))
screen := Get(ID_SCREEN)
CopyStructure(pic,screen)
screen.memptr1 := pic.bitmap.data
screen.palette := NIL
screen.attrib := BLANKPALETTE
IF (screen := Init(screen,NIL))
Display(screen);
REPEAT
WaitAVBL()
fstate := ColourToPalette(screen,fstate,2,0,screen.bitmap.amtcolours,pic.palette+8,$000000);
UNTIL (fstate != NIL)
REPEAT
WaitAVBL()
fstate := PaletteToColour(screen,fstate,2,0,screen.bitmap.amtcolours,pic.palette+8,$a5f343)
UNTIL (fstate != NIL)
REPEAT
WaitAVBL()
fstate := ColourMorph(screen,fstate,2,0,screen.bitmap.amtcolours,$a5f343,$000000);
UNTIL (fstate != NIL)
Free(screen)
ENDIF
Free(pic)
ENDIF
Free(scrmodule)
ENDIF
CloseDPK()
ENDIF
ENDPROC